<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="/WEB-INF/jsp/include/easyui.jsp" %>
<%@ include file="/WEB-INF/jsp/include/pForm.jsp" %>
<%@ include file="/WEB-INF/jsp/include/easyui-layui-upload.jsp" %>
<script src="/plug-in/jquery-easyui-1.5.1/plugins/jquery.choosebox.js"></script>
<title>项目管理新增页面</title>
<script>
$(function(){
	fn.resetForm();
});

function onOrgNoSelect(record){
	$("input[name=department]").val(record.orgName);
}
</script>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<!-- 替换自动form表单 -->
		<form id="easyuiForm" method="post" action="/console/com.fs.jzzn.pojo.NewProject/newAdd"   >
		 <!--类名属性及默认主键id-->
		 		<input type="hidden" name="className" value="com.fs.jzzn.pojo.NewProject" />
		 		<input type="hidden" name="createrId" value="${SESSION_USER.user.id}" />
			 	<input type="hidden" name="department" value="" />
			 
			 <div style="margin-bottom:20px">
			  		<input class="easyui-autoCode easyui-validatebox" name="pNo" style="width:270px;"   data-options="label:'项目编号:',required:true,prefix:'JZ',timestamp:'yyMMddss',validType:['length[1,25]','remote[\'/console/newProject/remote\',\'pNo\']']"/>
			 		
			 		 <select class="easyui-combobox" name="region" style="width:270px;" data-options="label:'所属区域:' ,required:true" 
						url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=C1&pCode_searchType=eq&text=湖北" >
				   </select>
			 </div>
			 <div style="margin-bottom:20px">
			 	<select class="easyui-combotreegrid" name="orgNo" style="width:540px;" data-options="label:'组织结构:',panelWidth:450,required:true,
	           	idField: 'orgNo', 
	           	missingMessage:'必填项',
				treeField: 'orgName',
				value:'${SESSION_USER.user.orgNo}',
				sortName:'orgOrder',
				onSelect:function(row){
					$('input[name=department]').val(row.orgName);	    
				},
				sortOrder:'asc',
	            url:'/console/com.fs.base.pojo.Org/list', 
	            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
	            columns:[[    
	                {field:'orgName',			width:190,	title:'组织名称' }
		         	,{field:'orgType',			width:70,	title:'分类' }
		         	,{field:'orgNo',				width:100,	title:'组织编码' }
		         	,{field:'orgLeaderName',	width:70,	title:'负责人'}
	            ]]"></select>
				  <!-- 
				  <select class="easyui-combobox" name="orgNo" style="width:270px;"  data-options="label:'组织机构:' ,required:true,panelHeight:120,onSelect:onOrgNoSelect" 
						url="/console/combobox?valueField=orgNo&textField=orgName&modleName=org&orgType=项目部&orgType_searchType" >
				   </select>
				   -->
				 <!-- 
				   <input class="easyui-textbox easyui-validatebox" id="department" readonly="readonly" name="department" style="width:270px;" data-options="label:'项目部:',validType:'length[0,500]'" />
				 <select class="easyui-combobox" name="department" style="width:270px;" data-options="label:'项目部(逐步弃用):',panelHeight:120,loadFilter:fn.departmentFilter" 
						url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A5&pCode_searchType=eq" >
				 </select>
				  -->
			 </div>
			 
			  <div style="margin-bottom:20px">
			  		<input class="easyui-textbox easyui-validatebox" name="pName" multiline="true" style="width:540px;height:60px;" data-options="label:'项目名称:',required:true,validType:'length[0,200]'" />
			 </div>
			 
		</form>
	</div>
</body>
</html>